import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import BlogLogin from '@/components/common/BlogLogin.vue'
import Regist from '@/components/common/Regist.vue'
import Findpsd from '@/components/common/Findpsd.vue'

import Chat from '@/components/chat/Chat.vue'

// import BlogIndex from '@/components/common/BlogIndex.vue'
import BlogAdd from '@/components/table/vBolgAdd.vue'
import BlogLook from '@/components/table/vBlogLook.vue'
import BlogEdit from '@/components/table/vBlogEdit.vue'
import Home from '@/components/pages/Home.vue'
import Dashboard from '@/components/common/Dashboard.vue'
import AliPay from '@/components/system/SysAlipay.vue'
import Chartpillar from '@/components/chart/Chartpillar.vue'

// import Upload from '@/components/common/upload.vue'
// import VueEditor from '@/components/common/VueEditor.vue';
// import BaseTable from '@/components/common/BaseTable.vue';
// import Error from '@/components/common/error.vue';


Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'Login',
      component:BlogLogin,
      hidden:true
    },{
      path:'/alipay',
      name:'alipay',
      component:AliPay,
      hidden:true
    },{
        path: '/add',
        name: 'BlogAdd',
        component: BlogAdd
      },{
        path: '/chart',
        name: 'Chartpillar',
        component: Chartpillar
      },
      {
        path: '/look',
        name: 'BlogLook',
        component: BlogLook
      },
      {
        path: '/edit',
        name: 'BlogEdit',
        component: BlogEdit
      },
      {
        path: '/reg',
        name: 'Regist',
        component: Regist
      },{
        path: '/find',
        name: 'Findpsd',
        component: Findpsd
      },
      {
      path:'/home',
      name:'Home',
      component:Home,
      redirect:'/dashboard',
      children: [
        {
          path: '/dashboard',
          name: 'Dashboard',
          component: Dashboard
        },
        {
          path: '/chat',
          name: '消息',
          component: Chat,
          hidden: true,
          meta: {
            keepAlive: false,
            requireAuth: true
          }
        }
      ]
    },
    
    // {
    //   path: '/',
    //   redirect: '/login'
    // },
    // {
    //   path: '/home',
    //   name: 'Home',
    //   component: Home,
    //   meta: { title: '系统首页' },
    //   children: [
    //     {
    //       path: '/index',
    //       name: 'BlogIndex',
    //       component: BlogIndex
    //     },
    //     {
    //       path: '/dashboard',
    //       name: 'Dashboard',
    //       component: Dashboard
    //     },
    //     {
    //       path: '/add',
    //       name: 'BlogAdd',
    //       component: BlogAdd
    //     },
    //     {
    //       path: '/look',
    //       name: 'BlogLook',
    //       component: BlogLook
    //     },
    //     {
    //       path: '/edit',
    //       name: 'BlogEdit',
    //       component: BlogEdit
    //     },
    //     {
    //       path:'/upload',
    //       name:'Upload',
    //       component:Upload
    //     },
    //     {
    //       path:'/editor',
    //       name:'editor',
    //       component:VueEditor
    //     }, 
    //     {
    //       path:'/form',
    //       name:'form',
    //       component:BaseTable
    //     },
    //     {
    //       path:'/error',
    //       name:'error',
    //       component:Error
    //     }
    //   ]
    // },
    // {
    //   path: '/index',
    //   name: 'BlogIndex',
    //   component: BlogIndex
    // },
    // {
    //   path: '/manage',
    //   redirect: '/login'
    // },
    // {
    //   path: '/login',
    //   name: 'BlogLogin',
    //   component: BlogLogin
    // },

  ]
})
